package com.back.Service.impl;

import com.back.Dao.Device;
import com.back.Dao.DeviceData;
import com.back.Dao.User;
import com.back.Mapper.DeviceMapper;
import com.back.Service.DeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeviceServiceImpl implements DeviceService {

    @Autowired
    DeviceMapper deviceMapper;

    @Override
    public List<Device> findAllDeice() {
        return deviceMapper.findAllDeice();
    }

    @Override
    public Device findDeviceById(Integer id) {
        return deviceMapper.findDeviceById(id);
    }

    @Override
    public Integer DelDevice(int id) {
        return deviceMapper.DelDevice(id);
    }

    @Override
    public Integer updateDevice(Device device) {
        return deviceMapper.updateDevice(device);
    }

    @Override
    public Integer addDevice(Device device) {
        return deviceMapper.addDevice(device);
    }

    @Override
    public List<Device> findDeviceByAddress(String address) {
        return deviceMapper.findDeviceByAddress(address);
    }
}
